- /* sdcmpi4.cpp by K.Tsuru */
- // function ID 3550 DRADIX, constant
- /********************************
- SDouble class
- pi/4
- Used in Atan(), etc.
- *********************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- static SDouble* mpi4 = NULL; //keep in the static memory
- static uint mpi4_size = 0;
-
- void MPi4Free(){ //free the memory of mpi4
- if(mpi4_size == 0) return;
- delete mpi4; mpi4 = NULL; mpi4_size = 0;
- }
-
- /* pi/4 */
- SDouble MPi4(){
- uint ms = SNManager::SNMaxSize(SNManager::REAL);
- if(mpi4_size < ms){
- if(mpi4 == NULL) mpi4 = new SDouble;
-
- SDouble pi;
- pi = Pi();
- *mpi4 = DsDiv(pi, 4uL); // pi/4
- mpi4_size = ms;
- }
- return *mpi4;
- }
sdcmpi4.cpp : last modifiled at 2017/06/23 10:17:11(689 bytes)
created at 2017/10/07 10:21:15
The creation time of this html file is 2017/10/07 10:30:03 (Sat Oct 07 10:30:03 2017).